//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<CCanvasSlot.h>
///	@path	~/src/graphics/canvas/
///	@date	2008/04/23
///	@desc	.

#pragma once

#include "xeres.h"

#include "graphics/ICanvas.h"

namespace xeres {

	/*!
		\class	CCanvasSlot
		\brief	Stores multiple canvas in fixed slots.
	*/
	class CCanvasSlot : public ICanvas
	{
	public:

		/// \ctor
		CCanvasSlot( size_t slot_count );

		/// \dtor
		virtual ~CCanvasSlot( void );

		DECL_IOBJECT_CLASS( CCanvasSlot , ICanvas );

	public:

		/// \impl
		virtual void Initialize( RefWeak<IRenderer> renderer );

		/// \impl
		virtual void Finalize( void );

		/// \impl
		virtual void Render( RenderContext& rc );

		/*!
			\brief		Set slot canvas.
		*/
		void SetSlot( size_t slot , RefWeak<ICanvas> sub_canvas );

	private:

		//@ data
		std::vector< Ref<ICanvas> >		m_subCanvas;
	};

} // namespace xeres
